<%@ page import="com.carmanagement.FullTank" %>


<script type="text/javascript">
	$(document).ready(function()
	{
	  $("#datepicker").datepicker({dateFormat: 'yy/mm/dd'});
	})
</script>


<div class="fieldcontain ${hasErrors(bean: fullTankInstance, field: 'mileage', 'error')} required">
	<label for="mileage">
		<g:message code="fullTank.mileage.label" default="Mileage" />
		<span class="required-indicator">*</span>
	</label>
	<g:field name="mileage" type="number decimal" value="${fullTankInstance.mileage}" required="" pattern="\\d+(\\.\\d{2})?"/>
</div>

<div class="fieldcontain ${hasErrors(bean: fullTankInstance, field: 'cost', 'error')} required">
	<label for="cost">
		<g:message code="fullTank.cost.label" default="Cost" />
		<span class="required-indicator">*</span>
	</label>
	<g:field name="cost" type="number decimal" value="${fieldValue(bean: fullTankInstance, field: 'cost')}" required="" pattern="\\d+(\\.\\d{2})?"/>
</div>

<div class="fieldcontain required">
	<label for="date">
		<g:message code="fullTank.date.label" default="Date" />
		<span class="required-indicator">*</span>
	</label>
	<g:field id="datepicker" name="date" type="text" readonly="true" value="${fullTankInstance?.date?.format("yyyy/MM/dd")}"  required=""/>
</div>

<div class="fieldcontain ${hasErrors(bean: fullTankInstance, field: 'quantity', 'error')} required">
	<label for="quantity">
		<g:message code="fullTank.quantity.label" default="Quantity" />
		<span class="required-indicator">*</span>
	</label>
	<g:field name="quantity" type="text" value="${fieldValue(bean: fullTankInstance, field: 'quantity')}" required="" pattern="\\d+(\\.\\d{2})?"/>
</div>

<div class="fieldcontain ${hasErrors(bean: fullTankInstance, field: 'vehicle', 'error')} required">
	<label for="vehicle">
		<g:message code="fullTank.vehicle.label" default="Vehicle" />
		<span class="required-indicator">*</span>
	</label>
	<g:field name="vehicle" type="hidden" readonly="true" value="${fullTankInstance?.vehicle?.id} "/>
	<label for="vehicle">${fullTankInstance.vehicle.registerNumber}</label>
</div>

